<!DOCTYPE html>

<html>
<head>
  <title>登录 - 我的 beego 播客</title>

  {{template "header"}}
</head>

<body style="padding-top: 70px">
  <!-- 导航栏 -->
  {{template "navbar"}}

  <div class="container" style="width: 500px">

    <form method="POST" action="/login">
      <div class="form-group">
        <label>Account</label>
        <input id="uname" type="text" class="form-control" placeholder="Enter Account" name="uname">
      </div>
      <div class="form-group">
        <label>Password</label>
        <input id="pwd" type="password" class="form-control" placeholder="Password" name="pwd">
      </div>
      <div class="checkbox">
        <label>
          <input id="autoLogin" type="checkbox" name="autoLogin"> 自动登录
        </label>
      </div>
      <button class="btn btn-default" onclick="return checkInput()">登录</button>
      <button class="btn btn-default" onclick="return backToHome()">返回</button>
    </form>
  </div>
    <!-- 导入bootstrap js插件 -->
    <script type="text/javascript" src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
    <script type="text/javascript">
      function checkInput() {
        var uname = document.getElementById("uname");
        console.log("aaaa"+uname);
        if (uname == undefined || uname == "") {
          window.alter("请输入账号！");
          return false;
        }
        var uname = document.getElementById("pwd");
        if (pwd == undefined || pwd == "") {
          alter("请输入密码！");
          return false;
        }
        return true;
      }

      function backToHome() {
        window.location.href = "/"
        return false;
      }
    </script>
</body>


</html>